home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / kn / elate / visual / drawrgb.asm < prev    next >
Encoding:
Assembly Source File  |  2001-05-12  |  1.4 KB  |  61 lines

  1.  
  2.     .include 'taort'
  3.     .include 'ave/toolkit/toolkit.inc'
  4.     .include 'lib/tek/kn/elate/visual.inc'
  5.  
  6. ;=============================================================================
  7. ;-----------------------------------------------------------------------------
  8. ;    TEKlib
  9. ;    (C) 1999-2001 TEK neoscientists
  10. ;    all rights reserved.
  11. ;
  12. ;    extern void kn_drawrgb(TAPTR v, TUINT *buf, TINT x, TINT y, TINT w, TINT h, TINT totw)
  13. ;
  14. ;    TODO: if totw == w, use a single copy
  15. ;
  16. ;-----------------------------------------------------------------------------
  17. ;=============================================================================
  18.  
  19.     tool 'lib/tek/kn/visual/drawrgb',VP,TF_EMBED
  20.  
  21. ;-----------------------------------------------------------------------------
  22.  
  23.     ent p0 p1 i0 i1 i2 i3 i4 : -
  24.  
  25.     defbegin
  26.     defp visual,buffer
  27.     defi x,y,w,h,totw,over
  28.     defp dest
  29.  
  30.         cpy.i    [visual+vis_width]-x-w,over
  31.         bcp    over ge 0,_ok
  32.         add.i    over,w
  33.         bcn    w le 0,_raus
  34.         
  35. _ok:        cpy.i    [visual+vis_height]-y-h,over
  36.         bcp    over ge 0,_ok2
  37.         add.i    over,h
  38.         bcn    h le 0,_raus
  39. _ok2:
  40.         cpy.p    [visual+vis_buffer],dest
  41.         add.p    (x+(y*[visual+vis_width]))<<2,dest
  42.         cpy.i    totw<<2,totw
  43.         cpy.i    w<<2,w
  44.  
  45. _copy:        cpbi    buffer,dest,w
  46.         add.p    totw,buffer
  47.         add.p    [visual+vis_width]<<2,dest
  48.         dec.i    h
  49.         bcp    h gt 0,_copy
  50.  
  51. _raus:
  52.         ret
  53.  
  54.     defend
  55.  
  56.     toolend
  57.  
  58. ;-----------------------------------------------------------------------------
  59. ;=============================================================================
  60.